Po Lu [Wed, 16 Mar 2022 04:33:15 +0000 (12:33 +0800)]
Better handle drag-and-drop from one Emacs frame to another
* doc/lispref/frames.texi (Drag and Drop): Document new
parameter `return-frame' to `x-begin-drag'.
* lisp/mouse.el (mouse-drag-and-drop-region): Utilize new
feature.
* src/xfns.c (Fx_begin_drag): New parameter `return-frame'.
* src/xterm.c (x_dnd_begin_drag_and_drop): New parameter
return_frame_p.
(handle_one_xevent): Set new flags and return frame whenever
appropriate.
* src/xterm.h: Update prototypes.
Po Lu [Wed, 16 Mar 2022 03:45:46 +0000 (11:45 +0800)]
* src/xfns.c (Fx_begin_drag): Improve doc string.
Po Lu [Wed, 16 Mar 2022 03:29:36 +0000 (11:29 +0800)]
Add support for dragging text from Emacs to other programs
This still probably needs some more protection from
malfunctioning clients which delete windows at random, but I
don't know if that's a problem in practice.
* doc/emacs/frames.texi (Drag and Drop):
* doc/lispref/frames.texi (Drag and Drop): Document new
features.
* etc/NEWS: Announce new function `x-begin-drag' and new user
option `mouse-drag-and-drop-region-cross-program'.
* lisp/mouse.el (mouse-drag-and-drop-region-cross-program): New
user option.
(x-begin-drag): New variable declaration.
(mouse-drag-and-drop-region): If the mouse moves out of an Emacs
frame, begin a window system drag.
* lisp/x-dnd.el (x-dnd-handle-xdnd): Remove left-over debugging
code.
* src/xfns.c (Fx_set_mouse_absolute_pixel_position): Fix
indentation of opening paren.
(Fx_begin_drag): New function.
(syms_of_xfns): Define new subr.
* src/xselect.c (x_timestamp_for_selection): New function.
* src/xterm.c (X_DND_SUPPORTED_VERSION): New preprocessor
declaration.
(x_dnd_get_window_proto, x_dnd_send_enter, x_dnd_send_position)
(x_dnd_send_leave, x_dnd_send_drop, x_set_dnd_targets)
(x_dnd_begin_drag_and_drop): New functions.
(handle_one_xevent): Handle drag-and-drop motion and button
events when active.
(x_free_frame_resources): If f is the DND source, stop
drag-and-drop.
(x_term_init): Intern new atoms.
(syms_of_xterm): New symbol QXdndSelection.
* src/xterm.h (struct x_display_info): New atoms
Xatom_XdndAware, Xatom_XdndSelection, Xatom_XdndTypeList,
Xatom_XdndActionCopy, Xatom_XdndActionMove,
Xatom_XdndActionLink, Xatom_XdndActionAsk,
Xatom_XdndActionPrivate, Xatom_XdndActionList,
Xatom_XdndActionDescription, Xatom_XdndProxy, Xatom_XdndEnter,
Xatom_XdndPosition, Xatom_XdndStatus, Xatom_XdndLeave,
Xatom_XdndDrop, and Xatom_XdndFinished.
Po Lu [Wed, 16 Mar 2022 00:41:24 +0000 (08:41 +0800)]
Fix build with GTK 3.18.0 or earlier
* src/gtkutil.c (xg_update_scroll_bar_pos)
(xg_update_horizontal_scrollbar_pos): Avoid
gtk_widget_queue_allocate on older GTK versions.
Eli Zaretskii [Tue, 15 Mar 2022 19:21:20 +0000 (21:21 +0200)]
Clean up implementation of N0 per UAX#9
* src/bidi.c (bidi_resolve_brackets): Instead of requiring
prev_for_neutral's type to be known, fall back on SOS, per
the UBA.
Sam Steingold [Tue, 15 Mar 2022 16:22:48 +0000 (12:22 -0400)]
Extract `gnus-collect-urls-from-article' from `gnus-summary-browse-url'
* lisp/gnus-sum.el (gnus-collect-urls-from-article):
New function, extracted from `gnus-summary-browse-url'.
(gnus-summary-browse-url): Use it.
Stefan Monnier [Tue, 15 Mar 2022 14:18:07 +0000 (10:18 -0400)]
* lisp/url/url-vars.el: Cosmetic changes
(url-mime-separator-chars): Simplify.
(url-interactive-p): Tweak docstring.
Stefan Monnier [Tue, 15 Mar 2022 14:12:46 +0000 (10:12 -0400)]
doctex-mode: Try and fix bug#35140
* lisp/textmodes/tex-mode.el (doctex-syntax-propertize-rules):
Add support for the new ^^X and consider the first ^ of ^^A to be the
closing char for the previous comment.
(doctex-font-lock-^^A): Simplify accordingly.
Lars Ingebrigtsen [Tue, 15 Mar 2022 11:44:50 +0000 (12:44 +0100)]
Fix byte-code button in help--describe-command
* lisp/help.el (help--describe-command): Fix byte-code button
(bug#24235).
Lars Ingebrigtsen [Tue, 15 Mar 2022 11:36:06 +0000 (12:36 +0100)]
Revert "New command `gnus-summary-browse-all-urls' bound to "v""
This reverts commit
f52dcfd03ad542704d9a43faab0c33be09ab442e.
It was never agreed that this should be added.
Po Lu [Tue, 15 Mar 2022 04:46:01 +0000 (04:46 +0000)]
Fix some minor glitches with Haiku scroll bars
* src/haiku_support.cc (MouseDown): Don't start overscroll if
dragging started inside a button.
Po Lu [Tue, 15 Mar 2022 04:14:56 +0000 (12:14 +0800)]
Fix crashes when trying to pop up a menu on GTK 2
* src/xterm.c (handle_one_xevent): Respect finish when
dispatching copy.
Po Lu [Tue, 15 Mar 2022 04:09:45 +0000 (12:09 +0800)]
Fix some issues with input on GTK 2 builds
* src/xfns.c (setup_xi_event_mask): Don't ask for XI key press
on GTK 2.
Po Lu [Tue, 15 Mar 2022 02:28:54 +0000 (10:28 +0800)]
Fix extraneous ifdef in xwidgets code
* xterm.c (handle_one_xevent): Pass GesturePinchEnd events to
xwidgets regardless of no-longer-present define.
Po Lu [Tue, 15 Mar 2022 02:24:13 +0000 (10:24 +0800)]
* src/xterm.c (handle_one_xevent): Fix use of wrong motion structure.
Po Lu [Tue, 15 Mar 2022 00:54:30 +0000 (08:54 +0800)]
Stop relying on dynlib for PGTK interrupt input
* src/pgtkterm.c (pgtk_term_init): Use dlopen and dlsym directly
instead of dynlib functions. (bug#54378)
Thomas Fitzsimmons [Mon, 14 Mar 2022 21:33:42 +0000 (17:33 -0400)]
EUDC: Fix a bug and some docstrings
* lisp/net/eudc.el (eudc-register-protocol): Add doc string.
(eudc-expand-inline): Add TRY-ALL-SERVERS to docstring.
(eudc-query-with-words): Fix early-return bug reported by
Alexander Adolf.
(eudc-menu): Add doc string.
(eudc-install-menu): Likewise.
Paul Eggert [Mon, 14 Mar 2022 20:14:23 +0000 (13:14 -0700)]
Another fix for the no-toolkit build
This should be better in the long run.
* oldXMenu/Activate.c (XMenuActivate): Revert previous change,
eliminating the goto it introduced.
* oldXMenu/XMenuInt.h: Include <attribute.h>, for FALLTHROUGH.
Paul Eggert [Mon, 14 Mar 2022 15:55:46 +0000 (08:55 -0700)]
Prefer CALLN
* src/bytecode.c (Fbyte_code):
* src/composite.c (Fclear_composition_cache):
Prefer CALLN to doing it by hand.
* src/fns.c (ccall2): Remove. All uses replaced by CALLN.
Sam Steingold [Fri, 11 Mar 2022 18:59:46 +0000 (13:59 -0500)]
New command `gnus-summary-browse-all-urls' bound to "v"
* lisp/gnus-sum.el (gnus-collect-urls-from-article): New function,
extracted from `gnus-summary-browse-url'.
(gnus-summary-browse-url): Use it; also use `browse-url-button-open-url'
to handle the prefix argument.
(gnus-summary-browse-all-urls): New command.
(gnus-summary-mode-map): Bind `gnus-summary-browse-all-urls' to "v".
Po Lu [Mon, 14 Mar 2022 13:48:47 +0000 (21:48 +0800)]
Fix the no toolkit build
* Activate.c (XMenuActivate): Stop relying on fallthroughs
inside switch statement. (bug#54382)
Lars Ingebrigtsen [Mon, 14 Mar 2022 13:46:25 +0000 (14:46 +0100)]
Fix RFC2047 encoding of Disposition-Notification-To
* lisp/mail/rfc2047.el (rfc2047-header-encoding-alist): Encode
Disposition-Notification-To as an address header (bug#54383).
Po Lu [Mon, 14 Mar 2022 13:37:42 +0000 (21:37 +0800)]
Handle position specification hints on X toolkit builds
* src/xterm.c (x_wm_set_size_hint): Set PPosition and USPosition
independently of Xt.
Stefan Monnier [Mon, 14 Mar 2022 13:28:18 +0000 (09:28 -0400)]
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Simplify Edebug spec
Lars Ingebrigtsen [Mon, 14 Mar 2022 11:16:27 +0000 (12:16 +0100)]
Improve the execute-kbd-macro doc string
* src/macros.c (Fexecute_kbd_macro): Improve the doc string
(bug#14206).
Philipp Stephani [Mon, 14 Mar 2022 09:59:03 +0000 (10:59 +0100)]
Make Edebug specification for 'cl-defstruct' more lenient.
For example, 'xref-item' uses the list form of ':noinline'.
* lisp/emacs-lisp/cl-macs.el (cl-defstruct): Accept ':noinline' and
':named' with an argument.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-defstruct/edebug): New
unit test.
Lars Ingebrigtsen [Mon, 14 Mar 2022 09:27:12 +0000 (10:27 +0100)]
Don't always escape "." and "?" in `prin1'
* src/print.c (print_object): Only escape "." and "?" when
appearing as the first character in a symbol (bug#23130).
Martin Rudalics [Mon, 14 Mar 2022 09:26:36 +0000 (10:26 +0100)]
Init 'rest' in 'balance-windows-2' (Bug#54380)
* lisp/window.el (balance-windows-2): Give 'rest' an initial
value (Bug#54380).
Po Lu [Mon, 14 Mar 2022 06:48:34 +0000 (06:48 +0000)]
Clean up some Haiku toolkit code
* src/haiku_io.c (haiku_read_with_timeout): Accept `bigtime_t'
instead of `time_t' for values which are cast to bigtime_t
anyway.
* src/haiku_support.cc (BMenu_run): Read all help events instead
of just one.
* src/haiku_support.h: Update prototypes.
Stefan Kangas [Mon, 14 Mar 2022 05:30:42 +0000 (06:30 +0100)]
; Merge from origin/emacs-28
The following commit was skipped:
8e7a3f21e0 Fix evaluation of negated argument predicates in Eshell
Stefan Kangas [Mon, 14 Mar 2022 05:30:41 +0000 (06:30 +0100)]
Merge from origin/emacs-28
1ec4063017 ; * admin/make-tarball.txt: Minor updates.
Po Lu [Mon, 14 Mar 2022 02:45:55 +0000 (02:45 +0000)]
Fix extraneous overscroll activation on Haiku
* src/haiku_support.cc (class EmacsScrollBar): New field
`maybe_overscroll'.
(MouseDown): Set that field.
(MouseUp): Clear that field.
(MouseMoved): Also test `maybe_overscroll' to ensure that a grab
started inside the scroll bar.
Po Lu [Mon, 14 Mar 2022 01:05:48 +0000 (09:05 +0800)]
Fix tool-bar highlight persisting after mouse moves onto WM frame
* src/xterm.c (handle_one_xevent): Always report MotionNotify
coordinates in terms of the edit widget.
Glenn Morris [Mon, 14 Mar 2022 01:03:11 +0000 (18:03 -0700)]
* src/bytecode.c: Include sysstdio.h, for fprint, stderr.
; Ref https://hydra.nixos.org/build/
169207408
Po Lu [Mon, 14 Mar 2022 00:54:10 +0000 (00:54 +0000)]
Enable overscroll on Haiku horizontal scroll bars
* src/haiku_support.cc (MouseMoved): Handle horizontal
directions correctly.
* src/haikuterm.c (haiku_set_horizontal_scroll_bar_thumb):
Enable overscrolling on scroll bar widget.
Po Lu [Mon, 14 Mar 2022 00:45:00 +0000 (00:45 +0000)]
Fix scroll bar movement right before overscroll begins on Haiku
* src/haikuterm.c (haiku_set_scroll_bar_thumb): Make sure value
and size are within bounds even if portion adjustment is off.
Lars Ingebrigtsen [Sun, 13 Mar 2022 20:15:35 +0000 (21:15 +0100)]
Really fix find-func for defgeneric
* lisp/emacs-lisp/find-func.el (find-function-regexp): Really add
defgeneric.
Lars Ingebrigtsen [Sun, 13 Mar 2022 20:13:49 +0000 (21:13 +0100)]
Make vtable sorting stable
* lisp/emacs-lisp/vtable.el (vtable--sort): Make the sorting
stable.
Paul Eggert [Sun, 13 Mar 2022 19:03:46 +0000 (12:03 -0700)]
Clang debug notes
* etc/DEBUG: Don’t imply Clang works as well as GCC when
debugging Emacs. Mention a coverage problem with Clang.
Jim Porter [Sun, 13 Mar 2022 14:36:37 +0000 (15:36 +0100)]
Fix evaluation of negated argument predicates in Eshell
* lisp/eshell/em-pred.el (eshell-add-pred-func): Let-bind 'pred' so
the lambdas see the original value (bug#54369).
Committed on the wrong branch.
Do not merge to master.
Jim Porter [Sun, 13 Mar 2022 14:36:37 +0000 (15:36 +0100)]
Fix evaluation of negated argument predicates in Eshell
* lisp/eshell/em-pred.el (eshell-add-pred-func): Let-bind 'pred' so
the lambdas see the original value (bug#54369).
Mattias Engdegård [Sun, 13 Mar 2022 18:35:50 +0000 (19:35 +0100)]
* src/bytecode.c (sf_set_ptr): Cast pointer to type of right size.
Mattias Engdegård [Sun, 13 Mar 2022 16:26:05 +0000 (17:26 +0100)]
Separate bytecode stack
Use a dedicated stack for bytecode, instead of using the C stack.
Stack frames are managed explicitly and we stay in the same
exec_byte_code activation throughout bytecode function calls and
returns. In other words, exec_byte_code no longer uses recursion
for calling bytecode functions.
This results in better performance, and bytecode recursion is no
longer limited by the size of the C stack. The bytecode stack is
currently of fixed size but overflow is handled gracefully by
signalling a Lisp error instead of the hard crash that we get now.
In addition, GC marking of the stack is now faster and more precise.
Full precision could be attained if desired.
* src/alloc.c (ATTRIBUTE_NO_SANITIZE_ADDRESS): Make non-static.
* src/bytecode.c (enum stack_frame_index, BC_STACK_SIZE)
(sf_get_ptr, sf_set_ptr, sf_get_lisp_ptr, sf_set_lisp_ptr)
(sf_get_saved_pc, sf_set_saved_pc, init_bc_thread, free_bc_thread)
(mark_bytecode, Finternal_stack_stats, valid_sp): New.
(exec_byte_code): Adapt to use the new bytecode stack.
(syms_of_bytecode): Add defsubr.
* src/eval.c (unwind_to_catch): Restore saved stack frame.
(push_handler_nosignal): Save stack frame.
* src/lisp.h (struct handler): Add act_rec member.
(get_act_rec, set_act_rec): New.
* src/thread.c (mark_one_thread): Call mark_bytecode.
(finalize_one_thread): Free bytecode thread state.
(Fmake_thread, init_threads): Set up bytecode thread state.
* src/thread.h (struct bc_thread_state): New.
(struct thread_state): Add bytecode thread state.
Mattias Engdegård [Tue, 18 Jan 2022 12:10:05 +0000 (13:10 +0100)]
Simplify exec_byte_code arguments
Pass the function object and encoded arity, not the other components.
This speeds up several call paths and is necessary for improvements to
come.
* src/bytecode.c (Fbyte_code): Make a new byte code object for
execution. This is slower but performance isn't critical here.
(exec_byte_code): Retrieve components from the passed function.
* src/eval.c (fetch_and_exec_byte_code):
* src/lisp.h (exec_byte_code): Update signature.
Michael Albinus [Sun, 13 Mar 2022 15:50:14 +0000 (16:50 +0100)]
* lisp/net/ange-ftp.el (ange-ftp-ls): Make a loop when sanitizing LSARGS.
Lars Ingebrigtsen [Sun, 13 Mar 2022 14:07:59 +0000 (15:07 +0100)]
Add cl-defgeneric to find-func, too
* lisp/emacs-lisp/find-func.el (find-function-regexp): Add
cl-defgeneric, too (bug#54343).
Po Lu [Sun, 13 Mar 2022 12:56:55 +0000 (12:56 +0000)]
Allow overscrolling on Haiku scroll bars that are full
* src/haiku_support.cc (MouseMoved): Allow overscrolling even if
portion is less than 1.0.
Po Lu [Sun, 13 Mar 2022 12:53:01 +0000 (12:53 +0000)]
Fix pointer event tracking on top of Haiku scroll bars
* src/haiku_support.cc (MouseDown): Set correct mouse event mask
in case the scroll bar widget decides to not do that.
Po Lu [Sun, 13 Mar 2022 12:32:15 +0000 (12:32 +0000)]
Fix splurious button events being generated on Haiku
* src/haiku_support.cc (MouseDown, MouseUp): Don't process if
the grab is not appropriate for the buttons that were pressed.
Po Lu [Sun, 13 Mar 2022 10:58:42 +0000 (18:58 +0800)]
Fix setting IM spot after key press events
* src/xterm.c (handle_one_xevent): Check f is not NULL before
trying to set its status area and set preedit spot location
after KeyPress events.
Mattias Engdegård [Sun, 13 Mar 2022 10:01:59 +0000 (11:01 +0100)]
Fix esh-proc-tests on macOS
* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline):
Add pattern matching output when killing a process on macOS (and
possibly other BSDs).
Eli Zaretskii [Sun, 13 Mar 2022 09:40:55 +0000 (11:40 +0200)]
; * etc/NEWS: Fix typo.
Eli Zaretskii [Sun, 13 Mar 2022 08:20:37 +0000 (10:20 +0200)]
; * etc/NEWS: Cleanups as followup to bug#50143.
Visuwesh [Sun, 13 Mar 2022 07:01:16 +0000 (12:31 +0530)]
* quail.el (quail-define-package): Describe VAR form in DOCSTRING better.
Bug#50143
Copyright-paperwork-exempt: yes
Visuwesh [Sun, 13 Mar 2022 05:46:38 +0000 (11:16 +0530)]
Follow contemporary practices in the Tamil input methods
* lisp/language/ind-util.el (indian-tml-base-digits-table): New table
to translate digits.
(indian-tml-base-table): Don't translate digits.
(indian-tml-itrans-digits-v5-hash): Hashtable that translates digits.
* lisp/leim/quail/indian.el (quail-tamil-itrans-compute-signs-table)
(quail-tamil-itrans-various-signs-table)
(quail-tamil-itrans-various-signs-and-digits-table): Separate out the
digits from the signs table using the function
'quail-tamil-itrans-compute-signs-table'.
(tamil-itrans-digits, tamil-inscript-digits): New input methods that
translates digits.
(tamil-itrans, tamil-inscript): Fix table inclusion.
* etc/NEWS: Announce the change.
Fixes bug#50143.
Copyright-paperwork-exempt: yes
Eli Zaretskii [Sun, 13 Mar 2022 07:53:59 +0000 (09:53 +0200)]
; * admin/make-tarball.txt: Minor updates.
Po Lu [Sun, 13 Mar 2022 07:27:24 +0000 (07:27 +0000)]
Fix small regression for horizontal scroll bars
* src/haikuterm.c (haiku_read_socket): Restore previous
horizontal scrollbar code, since the change it was intended for
was never made.
Po Lu [Sun, 13 Mar 2022 07:22:59 +0000 (07:22 +0000)]
Improve overscrolling support on Haiku
* src/haiku_support.cc (class EmacsScrollBar): New field
`real_max_value'.
(MessageReceived): Set real max value.
(MouseMoved): Get rid of magic numbers by using real max value
instead.
Po Lu [Sun, 13 Mar 2022 06:50:12 +0000 (06:50 +0000)]
; * haiku_support.cc (MessageReceived): Fix 32-bit build.
Po Lu [Sun, 13 Mar 2022 06:41:58 +0000 (06:41 +0000)]
Allow dragging scroll bar for overscroll on Haiku
* src/haiku_support.cc (class EmacsScrollBar): New fields
`in_overscroll', `can_overscroll', `last_overscroll',
`last_reported_overscroll_value' and `max_value'.
(ValueChanged): Make very sure extraneous value are not
generated.
(MouseUp): Clear overscroll if enabled.
(MouseMoved): If overscroll is enabled and dragging downwards
fails to dislodge the maximum value, enable overscrolling.
(BView_scroll_bar_update): New parameter `can_overscroll'
* src/haiku_support.h: Update prototypes.
* src/haikuterm.c (haiku_set_scroll_bar_thumb)
(haiku_set_horizontal_scroll_bar_thumb): Adjust parameters to
scroll bar update functions.
(haiku_read_socket): Take ceiling of bar position if
horizontal.
Stefan Kangas [Sun, 13 Mar 2022 05:30:42 +0000 (06:30 +0100)]
; Merge from origin/emacs-28
The following commit was skipped:
5ba9c8c364 Emacs pretest 28.0.92
Stefan Kangas [Sun, 13 Mar 2022 05:30:41 +0000 (06:30 +0100)]
Merge from origin/emacs-28
e5b191465d ; * admin/authors.el (authors-canonical-file-name): Remove...
6b0fdf73cf ; Fix data structures in authors.el
Stefan Monnier [Sun, 13 Mar 2022 04:51:22 +0000 (23:51 -0500)]
Flocate_file_internal: Protect from `.eln` remapping
Don't use `openp`s functionality to remap `.elc` files to `.eln` files
since `locate-file` is not specific to ELisp files.
This should be not just simpler but more robust than the current
hack which tries to undo the damage after the fact.
* src/lread.c (Flocate_file_internal): Don't map `.elc` to `.eln`.
* lisp/files.el (locate-file): Simplify accordingly.
Po Lu [Sun, 13 Mar 2022 01:28:58 +0000 (09:28 +0800)]
Improve reliaibility of scroll bar dimensions adjustment on GTK 3
* src/gtkutil.c (xg_scroll_bar_size_allocate_cb): New function.
(xg_finish_scroll_bar_creation): Attach new signal.
(xg_update_scrollbar_pos)
(xg_update_horizontal_scrollbar_pos): Also set window dimensions
for the event box.
* src/xterm.c (x_scroll_bar_configure): New function.
* src/xterm.h: Update prototypes.
Lars Ingebrigtsen [Sat, 12 Mar 2022 21:54:28 +0000 (22:54 +0100)]
Further locate-file fixes on nativecomp
* lisp/files.el (locate-file): Fix up previous locate-file change
-- don't unconditionally return .elc on nativecomp.
Lars Ingebrigtsen [Sat, 12 Mar 2022 21:45:28 +0000 (22:45 +0100)]
Disable esh-proc-test/kill-pipeline on EMBA
Test esh-proc-test/kill-pipeline condition:
(ert-test-failed
((should
(string-match-p
(rx ...)
(buffer-substring-no-properties output-start ...)))
:form
(string-match-p "\\(?:\\(?:interrupt\\|killed\\)\n\\)" "")
Lars Ingebrigtsen [Sat, 12 Mar 2022 21:40:49 +0000 (22:40 +0100)]
Fix EMBA failure for ert-test-record-backtrace
* test/lisp/emacs-lisp/ert-tests.el (ert-test-record-backtrace): Make
this work with AOT.
Lars Ingebrigtsen [Sat, 12 Mar 2022 21:32:08 +0000 (22:32 +0100)]
Return the same file from locate-file in nativecomp and non
* lisp/files.el (locate-file): Return the .elc file (if it exists)
in nativecomp, too, to mimic the behaviour from non-nativecomp
builds (bug#51308).
Lars Ingebrigtsen [Sat, 12 Mar 2022 17:53:36 +0000 (18:53 +0100)]
Make find-function-regexp also find cl-defun/defmethod
* lisp/emacs-lisp/find-func.el (find-function-regexp): Also find
cl-defun and cl-defmethod (bug#54343).
Colin Woodbury [Sat, 12 Mar 2022 17:46:55 +0000 (18:46 +0100)]
* lisp/progmodes/python.el: Account for new keywords.
* lisp/progmodes/python.el (python-font-lock-keywords-level-2): As
of Python 3.10, Python has structured pattern matching. This adds
two new keywords which need to be highlighted (bug#54345).
Alexander Adolf [Sat, 12 Mar 2022 17:15:24 +0000 (18:15 +0100)]
Facilitate Customisation of Message-Mode Header Completion Behaviour
* lisp/gnus/message.el (message-email-recipient-header-regexp):
New user option.
(message-completion-alist): Use it here.
Mattias Engdegård [Sat, 12 Mar 2022 16:53:29 +0000 (17:53 +0100)]
; * src/eval.c: (grow_specpdl): Remove another redundant declaration
Lars Ingebrigtsen [Sat, 12 Mar 2022 16:49:42 +0000 (17:49 +0100)]
Mark tramp-test30-make-process unstable on EMBA
* test/lisp/net/tramp-tests.el (tramp-test30-make-process): This times
out on EMBA.
Mattias Engdegård [Sat, 12 Mar 2022 16:46:38 +0000 (17:46 +0100)]
; * src/lisp.h: Remove redundant declaration
Mattias Engdegård [Thu, 3 Mar 2022 18:50:46 +0000 (19:50 +0100)]
Remove never-used relative jump opcodes
* src/bytecode.c (BYTE_CODES, exec_byte_code):
Remove relative jump opcodes that seem to have been a short-lived
experiment, never used in a release.
Mattias Engdegård [Thu, 3 Mar 2022 18:46:13 +0000 (19:46 +0100)]
Remove debug code for opcodes long gone
* src/bytecode.c (BYTE_CODES, enum byte_code_op, exec_byte_code):
Don't display custom messages in debug mode for Bscan_buffer and
Bset_mark which were removed long ago.
Mattias Engdegård [Thu, 3 Mar 2022 12:57:26 +0000 (13:57 +0100)]
Faster bytecode immediate argument fetching
* src/bytecode.c (FETCH2):
Use `|` instead of `+` to combine the bytes forming a 16-bit immediate
argument so that GCC (prior to version 12) recognises the idiom and
generates a 16-bit load. This applies for little-endian machines with
cheap unaligned accesses such as x86[-64], arm64 and power64le.
This 1-character change results in a measurable speed gain on many
kinds of Lisp code, as 16-bit immediates are used by all jump
instructions.
Clang performs this optimisation for both `+` and `|` from version 10.
Mattias Engdegård [Sat, 26 Feb 2022 11:49:02 +0000 (12:49 +0100)]
Maintain end of specpdl instead of size
Keep track of the end of specpdl explicitly since that is what we are
comparing against on critical code paths.
* src/eval.c (init_eval_once_for_pdumper, signal_or_quit)
(grow_specpdl_allocation):
* src/fileio.c (Fdo_auto_save):
* src/lisp.h (grow_specpdl):
* src/thread.c (run_thread, Fmake_thread):
* src/thread.h (struct thread_state):
Replace specpdl_size with specpdl_end, according to the equation
specpdl_end = specpdl + specpdl_size.
Mattias Engdegård [Wed, 16 Feb 2022 15:52:07 +0000 (16:52 +0100)]
Inline record_in_backtrace
It's critical in several function call paths.
* src/eval.c (grow_specpdl_allocation): Make non-static.
(grow_specpdl, record_in_backtrace): Move from here...
* src/lisp.h (grow_specpdl, record_in_backtrace): ... to here,
and declare inline.
Po Lu [Sat, 12 Mar 2022 12:58:18 +0000 (20:58 +0800)]
Fix the PGTK build
* src/gtkutil.c (xg_finish_scroll_bar_creation): Fix ifdefs
preventing x_window from being correctly set.
(xg_get_scroll_id_for_window): Ifdef out unused function.
Po Lu [Sat, 12 Mar 2022 12:33:18 +0000 (20:33 +0800)]
Try really hard to make GTK 3 scroll bars fit
* src/gtkutil.c (xg_get_widget_from_map): New argument DISPLAY.
All callers changed.
(find_scrollbar_cb): New function.
(xg_finish_scroll_bar_creation, xg_remove_scroll_bar)
(xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos)
(xg_set_toolkit_scroll_bar_thumb)
(xg_set_toolkit_horizontal_scroll_bar_thumb, xg_initialize):
Stop using id_to_widget_map on X builds with GTK 3 and set the
event box as the x_window instead.
* src/xterm.c (x_window_to_scroll_bar): Don't look for ID on GTK
3.
(handle_one_xevent): If a ConfigureNotify event is found for a
scroll bar and the dimensions are wrong, resize the X window to
the right ones.
Eli Zaretskii [Sat, 12 Mar 2022 09:44:46 +0000 (04:44 -0500)]
Emacs pretest 28.0.92
* README:
* configure.ac:
* nt/README.W32:
* msdos/sed2v2.inp: Bump Emacs version to 28.0.92.
* etc/AUTHORS:
* lisp/ldefs-boot.el: Update for pretest 28.0.92.
* ChangeLog.3: Regenerate.
Eli Zaretskii [Sat, 12 Mar 2022 08:32:47 +0000 (03:32 -0500)]
; * admin/authors.el (authors-canonical-file-name): Remove debug leftover.
Eli Zaretskii [Sat, 12 Mar 2022 08:28:45 +0000 (03:28 -0500)]
; Fix data structures in authors.el
* admin/authors.el (authors-aliases, authors-renamed-files-alist):
Update and correct the databases.
(authors-renamed-files-alist): Add commentary explaining how to
add entries for renamed/moved files.
(authors-canonical-file-name): Clarify the semantics of the
arguments.
Stefan Kangas [Sat, 12 Mar 2022 05:34:05 +0000 (06:34 +0100)]
Merge from origin/emacs-28
dbe6a3ecf7 Fix regression in 'custom-prompt-customize-unsaved-options'
a9920473f6 Improve documentation of 'map-charset-chars'
Po Lu [Sat, 12 Mar 2022 05:02:28 +0000 (13:02 +0800)]
Fix some issues with input methods that depend on button state
* src/xterm.c (handle_one_xevent): Translate button state before
filtering events.
Po Lu [Sat, 12 Mar 2022 03:16:00 +0000 (03:16 +0000)]
Fix horizontal scroll bar updating on Haiku
* src/haikuterm.c (haiku_set_horizontal_scroll_bar_thumb): Just
take portion and position without adjustments.
Po Lu [Sat, 12 Mar 2022 03:02:03 +0000 (03:02 +0000)]
Use more reasonable default timeouts in Haiku menu loop
* src/haiku_support.cc (BMenu_run): Set default timeout to 10
seconds.
Po Lu [Sat, 12 Mar 2022 02:47:03 +0000 (02:47 +0000)]
Make C-mouse-3 on scroll bars work on Haiku
* src/haiku_support.cc (class EmacsScrollBar): New field
`handle_button'.
(MouseDown, MouseUp): Pass button events with ControlMask to
parent view.
Po Lu [Sat, 12 Mar 2022 00:46:39 +0000 (00:46 +0000)]
Slightly improve scrollbar position accounting on Haiku
* src/haiku_support.cc (MessageReceived): Use floats for
calculating portion and subtract proportion directly.
* src/haikuterm.c (haiku_set_scroll_bar_thumb): Take ceiling of
value instead of rounding it.
Thomas Fitzsimmons [Fri, 11 Mar 2022 23:04:53 +0000 (18:04 -0500)]
EUDC: Support querying all servers
* lisp/net/eudc.el (eudc-expand-try-all): New command.
(eudc-expand-inline): Add `try-all-servers' optional argument.
Update `eudc-query-with-words' call.
(eudc-query-with-words): Add `try-all-servers' optional argument.
Move response formatting into main query loop. Query next server
if `try-all-servers' is non-nil.
(eudc-tail-menu): Add "Expand Inline Query Trying All Servers"
menu item.
* doc/misc/eudc.texi (Installation): Recommend
eudc-expand-try-all.
(Emacs-only Configuration): Likewise.
(Inline Query Expansion, Inline Query Expansion): Likewise.
Document `eudc-expand-try-all'.
* etc/NEWS (EUDC): Describe new 'eudc-expand-try-all' command.
Thomas Fitzsimmons [Fri, 11 Mar 2022 22:40:18 +0000 (17:40 -0500)]
EUDC: Update save-query-as-kill name and docstring
* lisp/net/eudc-vars.el (eudc-server): Fix quoting for checkdoc.
(eudc-expansion-save-query-as-kill): Rename from
`eudc-expansion-overwrites-query'. Define obsolete variable
alias. Update comment and documentation.
* lisp/net/eudc.el (eudc-expand-inline): Rename `replace' argument
to `save-query-as-kill'. Update argument documentation.
* doc/misc/eudc.texi (Inline Query Expansion): Rename
`eudc-expand-inline' argument.
* etc/NEWS (EUDC): Document `eudc-expansion-overwrites-query'
rename to `eudc-expansion-save-query-as-kill'.
Po Lu [Fri, 11 Mar 2022 12:41:30 +0000 (12:41 +0000)]
Fix a crash inside Haiku popup menus
* src/haiku_support.cc (BMenu_run): Handle B_WOULD_BLOCK from
wait_for_objects loop.
Po Lu [Fri, 11 Mar 2022 12:11:57 +0000 (20:11 +0800)]
Fix initial values of scroll bar foreground and background on GTK 3
* src/gtkutil.c (xg_create_frame_widgets): Stop creating
scrollbar stylesheet providers.
* src/xfns.c (Fx_create_frame): Create scroll bar stylesheet
providers here instead.
(x_set_scroll_bar_background):
(x_set_scroll_bar_foreground): Ignore tooltip frames.
Po Lu [Fri, 11 Mar 2022 12:07:52 +0000 (20:07 +0800)]
Implement customization of scroll bar colors on GTK 3
* src/gtkutil.c (xg_create_frame_widgets): Create CSS providers
for scroll bars.
(xg_finish_scroll_bar_creation): Attach created CSS providers.
* src/xfns.c (x_set_scroll_bar_foreground):
(x_set_scroll_bar_background): Put appropriate content into CSS
providers.
* src/xterm.c (x_free_frame_resources): Free CSS providers.
* src/xterm.h (struct x_output): New fields for scroll bar
stylesheet providers.
Po Lu [Fri, 11 Mar 2022 11:38:45 +0000 (19:38 +0800)]
* src/frame.c (scroll_bar_adjust_thumb_portion_p): Adjust doc string.
Po Lu [Fri, 11 Mar 2022 10:44:33 +0000 (10:44 +0000)]
Improve scroll bar treatment on Haiku
* src/haiku_support.cc (MessageReceived): Subtract portion from
range of scroll bar.
* src/haikuterm.c (BE_SB_MAX): Adjust values for better
rounding.
(haiku_set_scroll_bar_thumb): Round values instead of
truncating them.
Po Lu [Fri, 11 Mar 2022 08:56:54 +0000 (08:56 +0000)]
Fix inconsistent thumb position on Haiku scroll bars
* src/haikuterm.c (haiku_set_scroll_bar_thumb): If
scroll_bar_adjust_thumb_portion is nil, directly calculate thumb
portions without setting page_size.
Po Lu [Fri, 11 Mar 2022 08:36:11 +0000 (16:36 +0800)]
Handle Wayland displays correctly in browse-url
* lisp/net/browse-url.el (browse-url-process-environment): Use
WAYLAND_DISPLAY as the display environment variable on
PGTK. (bug#54333)
Po Lu [Fri, 11 Mar 2022 05:59:42 +0000 (13:59 +0800)]
Allow C-mouse-2 to split windows on XInput 2 builds
* src/xterm.c (handle_one_xevent): Use x_scroll_bar_handle_click
if ControlMask is set.